import request from '@/utils/request/index.js'
export default {
	
	/**上传动态时新增标签
	 * @param {Object} tagName
	 */
	saveTag(tagName){
		return request.request({
			url: '/h5/noctag/save',
			method: 'post',
			data: {
				tagName:tagName,
			},
		})
	},
	/**上传动态
	 * @param {Object} news
	 */
	uploadNews(news){
		return request.request({
			url:'/h5/nocnews/uploadNews',
			method: 'post',
			data:{
				news : news 
			}
		})
	},
	/**
	 * 获取推荐标签
	 */
	getRecomTagList(){
		return request.request({
			url:'/h5/noctag/list',
			method: 'post',
			data:{
				recomFlag: 1,
				page: 1,
				limit: 8
			}
		})
	},
	
	/**新增编辑流程
	 * @param {Object} id
	 */
	newsContent(id){
		return request.request({
			url:'/h5/noctag/list?id='+ id,
			method: 'get',
		})
	},
	/**更新动态
	 * @param {Object} id
	 * @param {Object} news
	 */
	updateNews(id,news){
		return request.request({
			url:'/h5/nocnews/updateNews?id='+ id ,
			method: 'post',
			data:{
				news : news
			}
		})
	},
	/**
	 * 编辑草稿视频时需要查询的数据
	 * @param id
	 * @returns {*}
	 */
	getVideoContent(id){
		return request.request({
			url:'/h5/nocvideo/videoContent?id='+ id ,
			method: 'get',
			
		})
	},
	/**
	 * 更新小视频
	 * @param videoId
	 * @param status
	 * @param title
	 * @param userTagList
	 * @param coverImg
	 * @returns {*}
	 */
	updateVideo(videoId,status,title,useTagList,coverImg){
		return request.request({
			url:'/h5/nocvideo/updateVideo',
			method: 'post',
			data: {
				id:videoId,
				status:status,
				ifLimit : 0,
				videoTitle:title,
				tagList:useTagList,
				coverImg:coverImg,
			},
		})
	},
	
}
